package com.example.demo.mapper;

import com.example.demo.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

//@Repository
public interface UserMapper {

    @Insert("insert into t_user values(#{id},#{username},#{password},#{age},#{phone},#{email},#{deparatment_id})")
    int insertOne(User user);

    int updateUserInfo(User user);

    @Select("select * from t_user where username=#{username}")
    User findOne(String username);
    @Select("select * from t_user")
    List<User> findAll();
}
